(0) Obligation:
Runtime Complexity Relative TRS:
The TRS R consists of the following rules:
f(C(x1, x2)) → C(f(x1), f(x2))
f(Z) → Z
eqZList(C(x1, x2), C(y1, y2)) → and(eqZList(x1, y1), eqZList(x2, y2))
eqZList(C(x1, x2), Z) → False
eqZList(Z, C(y1, y2)) → False
eqZList(Z, Z) → True
second(C(x1, x2)) → x2
first(C(x1, x2)) → x1
g(x) → x
The (relative) TRS S consists of the following rules:
and(False, False) → False
and(True, False) → False
and(False, True) → False
and(True, True) → True
Rewrite Strategy: INNERMOST
(1) DecreasingLoopProof (EQUIVALENT transformation)
The following loop(s) give(s) rise to the lower bound Ω(n1):
The rewrite sequence
f(C(x1, x2)) →+ C(f(x1), f(x2))
gives rise to a decreasing loop by considering the right hand sides subterm at position [0].
The pumping substitution is [x1 / C(x1, x2)].
The result substitution is [ ].
(2) BOUNDS(n^1, INF)
(3) RenamingProof (EQUIVALENT transformation)
Renamed function symbols to avoid clashes with predefined symbol.
(4) Obligation:
Runtime Complexity Relative TRS:
The TRS R consists of the following rules:
f(C(x1, x2)) → C(f(x1), f(x2))
f(Z) → Z
eqZList(C(x1, x2), C(y1, y2)) → and(eqZList(x1, y1), eqZList(x2, y2))
eqZList(C(x1, x2), Z) → False
eqZList(Z, C(y1, y2)) → False
eqZList(Z, Z) → True
second(C(x1, x2)) → x2
first(C(x1, x2)) → x1
g(x) → x
The (relative) TRS S consists of the following rules:
and(False, False) → False
and(True, False) → False
and(False, True) → False
and(True, True) → True
Rewrite Strategy: INNERMOST
(5) TypeInferenceProof (BOTH BOUNDS(ID, ID) transformation)
Infered types.
(6) Obligation:
Innermost TRS:
Rules:
f(C(x1, x2)) → C(f(x1), f(x2))
f(Z) → Z
eqZList(C(x1, x2), C(y1, y2)) → and(eqZList(x1, y1), eqZList(x2, y2))
eqZList(C(x1, x2), Z) → False
eqZList(Z, C(y1, y2)) → False
eqZList(Z, Z) → True
second(C(x1, x2)) → x2
first(C(x1, x2)) → x1
g(x) → x
and(False, False) → False
and(True, False) → False
and(False, True) → False
and(True, True) → True
Types:
f :: C:Z → C:Z
C :: C:Z → C:Z → C:Z
Z :: C:Z
eqZList :: C:Z → C:Z → False:True
and :: False:True → False:True → False:True
False :: False:True
True :: False:True
second :: C:Z → C:Z
first :: C:Z → C:Z
g :: g → g
hole_C:Z1_0 :: C:Z
hole_False:True2_0 :: False:True
hole_g3_0 :: g
gen_C:Z4_0 :: Nat → C:Z
(7) OrderProof (LOWER BOUND(ID) transformation)
Heuristically decided to analyse the following defined symbols:
f, eqZList
(8) Obligation:
Innermost TRS:
Rules:
f(
C(
x1,
x2)) →
C(
f(
x1),
f(
x2))
f(
Z) →
ZeqZList(
C(
x1,
x2),
C(
y1,
y2)) →
and(
eqZList(
x1,
y1),
eqZList(
x2,
y2))
eqZList(
C(
x1,
x2),
Z) →
FalseeqZList(
Z,
C(
y1,
y2)) →
FalseeqZList(
Z,
Z) →
Truesecond(
C(
x1,
x2)) →
x2first(
C(
x1,
x2)) →
x1g(
x) →
xand(
False,
False) →
Falseand(
True,
False) →
Falseand(
False,
True) →
Falseand(
True,
True) →
TrueTypes:
f :: C:Z → C:Z
C :: C:Z → C:Z → C:Z
Z :: C:Z
eqZList :: C:Z → C:Z → False:True
and :: False:True → False:True → False:True
False :: False:True
True :: False:True
second :: C:Z → C:Z
first :: C:Z → C:Z
g :: g → g
hole_C:Z1_0 :: C:Z
hole_False:True2_0 :: False:True
hole_g3_0 :: g
gen_C:Z4_0 :: Nat → C:Z
Generator Equations:
gen_C:Z4_0(0) ⇔ Z
gen_C:Z4_0(+(x, 1)) ⇔ C(Z, gen_C:Z4_0(x))
The following defined symbols remain to be analysed:
f, eqZList
(9) RewriteLemmaProof (LOWER BOUND(ID) transformation)
Proved the following rewrite lemma:
f(
gen_C:Z4_0(
n6_0)) →
gen_C:Z4_0(
n6_0), rt ∈ Ω(1 + n6
0)
Induction Base:
f(gen_C:Z4_0(0)) →RΩ(1)
Z
Induction Step:
f(gen_C:Z4_0(+(n6_0, 1))) →RΩ(1)
C(f(Z), f(gen_C:Z4_0(n6_0))) →RΩ(1)
C(Z, f(gen_C:Z4_0(n6_0))) →IH
C(Z, gen_C:Z4_0(c7_0))
We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).
(10) Complex Obligation (BEST)
(11) Obligation:
Innermost TRS:
Rules:
f(
C(
x1,
x2)) →
C(
f(
x1),
f(
x2))
f(
Z) →
ZeqZList(
C(
x1,
x2),
C(
y1,
y2)) →
and(
eqZList(
x1,
y1),
eqZList(
x2,
y2))
eqZList(
C(
x1,
x2),
Z) →
FalseeqZList(
Z,
C(
y1,
y2)) →
FalseeqZList(
Z,
Z) →
Truesecond(
C(
x1,
x2)) →
x2first(
C(
x1,
x2)) →
x1g(
x) →
xand(
False,
False) →
Falseand(
True,
False) →
Falseand(
False,
True) →
Falseand(
True,
True) →
TrueTypes:
f :: C:Z → C:Z
C :: C:Z → C:Z → C:Z
Z :: C:Z
eqZList :: C:Z → C:Z → False:True
and :: False:True → False:True → False:True
False :: False:True
True :: False:True
second :: C:Z → C:Z
first :: C:Z → C:Z
g :: g → g
hole_C:Z1_0 :: C:Z
hole_False:True2_0 :: False:True
hole_g3_0 :: g
gen_C:Z4_0 :: Nat → C:Z
Lemmas:
f(gen_C:Z4_0(n6_0)) → gen_C:Z4_0(n6_0), rt ∈ Ω(1 + n60)
Generator Equations:
gen_C:Z4_0(0) ⇔ Z
gen_C:Z4_0(+(x, 1)) ⇔ C(Z, gen_C:Z4_0(x))
The following defined symbols remain to be analysed:
eqZList
(12) RewriteLemmaProof (LOWER BOUND(ID) transformation)
Proved the following rewrite lemma:
eqZList(
gen_C:Z4_0(
+(
1,
n153_0)),
gen_C:Z4_0(
n153_0)) →
False, rt ∈ Ω(1 + n153
0)
Induction Base:
eqZList(gen_C:Z4_0(+(1, 0)), gen_C:Z4_0(0)) →RΩ(1)
False
Induction Step:
eqZList(gen_C:Z4_0(+(1, +(n153_0, 1))), gen_C:Z4_0(+(n153_0, 1))) →RΩ(1)
and(eqZList(Z, Z), eqZList(gen_C:Z4_0(+(1, n153_0)), gen_C:Z4_0(n153_0))) →RΩ(1)
and(True, eqZList(gen_C:Z4_0(+(1, n153_0)), gen_C:Z4_0(n153_0))) →IH
and(True, False) →RΩ(0)
False
We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).
(13) Complex Obligation (BEST)
(14) Obligation:
Innermost TRS:
Rules:
f(
C(
x1,
x2)) →
C(
f(
x1),
f(
x2))
f(
Z) →
ZeqZList(
C(
x1,
x2),
C(
y1,
y2)) →
and(
eqZList(
x1,
y1),
eqZList(
x2,
y2))
eqZList(
C(
x1,
x2),
Z) →
FalseeqZList(
Z,
C(
y1,
y2)) →
FalseeqZList(
Z,
Z) →
Truesecond(
C(
x1,
x2)) →
x2first(
C(
x1,
x2)) →
x1g(
x) →
xand(
False,
False) →
Falseand(
True,
False) →
Falseand(
False,
True) →
Falseand(
True,
True) →
TrueTypes:
f :: C:Z → C:Z
C :: C:Z → C:Z → C:Z
Z :: C:Z
eqZList :: C:Z → C:Z → False:True
and :: False:True → False:True → False:True
False :: False:True
True :: False:True
second :: C:Z → C:Z
first :: C:Z → C:Z
g :: g → g
hole_C:Z1_0 :: C:Z
hole_False:True2_0 :: False:True
hole_g3_0 :: g
gen_C:Z4_0 :: Nat → C:Z
Lemmas:
f(gen_C:Z4_0(n6_0)) → gen_C:Z4_0(n6_0), rt ∈ Ω(1 + n60)
eqZList(gen_C:Z4_0(+(1, n153_0)), gen_C:Z4_0(n153_0)) → False, rt ∈ Ω(1 + n1530)
Generator Equations:
gen_C:Z4_0(0) ⇔ Z
gen_C:Z4_0(+(x, 1)) ⇔ C(Z, gen_C:Z4_0(x))
No more defined symbols left to analyse.
(15) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n1) was proven with the following lemma:
f(gen_C:Z4_0(n6_0)) → gen_C:Z4_0(n6_0), rt ∈ Ω(1 + n60)
(16) BOUNDS(n^1, INF)
(17) Obligation:
Innermost TRS:
Rules:
f(
C(
x1,
x2)) →
C(
f(
x1),
f(
x2))
f(
Z) →
ZeqZList(
C(
x1,
x2),
C(
y1,
y2)) →
and(
eqZList(
x1,
y1),
eqZList(
x2,
y2))
eqZList(
C(
x1,
x2),
Z) →
FalseeqZList(
Z,
C(
y1,
y2)) →
FalseeqZList(
Z,
Z) →
Truesecond(
C(
x1,
x2)) →
x2first(
C(
x1,
x2)) →
x1g(
x) →
xand(
False,
False) →
Falseand(
True,
False) →
Falseand(
False,
True) →
Falseand(
True,
True) →
TrueTypes:
f :: C:Z → C:Z
C :: C:Z → C:Z → C:Z
Z :: C:Z
eqZList :: C:Z → C:Z → False:True
and :: False:True → False:True → False:True
False :: False:True
True :: False:True
second :: C:Z → C:Z
first :: C:Z → C:Z
g :: g → g
hole_C:Z1_0 :: C:Z
hole_False:True2_0 :: False:True
hole_g3_0 :: g
gen_C:Z4_0 :: Nat → C:Z
Lemmas:
f(gen_C:Z4_0(n6_0)) → gen_C:Z4_0(n6_0), rt ∈ Ω(1 + n60)
eqZList(gen_C:Z4_0(+(1, n153_0)), gen_C:Z4_0(n153_0)) → False, rt ∈ Ω(1 + n1530)
Generator Equations:
gen_C:Z4_0(0) ⇔ Z
gen_C:Z4_0(+(x, 1)) ⇔ C(Z, gen_C:Z4_0(x))
No more defined symbols left to analyse.
(18) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n1) was proven with the following lemma:
f(gen_C:Z4_0(n6_0)) → gen_C:Z4_0(n6_0), rt ∈ Ω(1 + n60)
(19) BOUNDS(n^1, INF)
(20) Obligation:
Innermost TRS:
Rules:
f(
C(
x1,
x2)) →
C(
f(
x1),
f(
x2))
f(
Z) →
ZeqZList(
C(
x1,
x2),
C(
y1,
y2)) →
and(
eqZList(
x1,
y1),
eqZList(
x2,
y2))
eqZList(
C(
x1,
x2),
Z) →
FalseeqZList(
Z,
C(
y1,
y2)) →
FalseeqZList(
Z,
Z) →
Truesecond(
C(
x1,
x2)) →
x2first(
C(
x1,
x2)) →
x1g(
x) →
xand(
False,
False) →
Falseand(
True,
False) →
Falseand(
False,
True) →
Falseand(
True,
True) →
TrueTypes:
f :: C:Z → C:Z
C :: C:Z → C:Z → C:Z
Z :: C:Z
eqZList :: C:Z → C:Z → False:True
and :: False:True → False:True → False:True
False :: False:True
True :: False:True
second :: C:Z → C:Z
first :: C:Z → C:Z
g :: g → g
hole_C:Z1_0 :: C:Z
hole_False:True2_0 :: False:True
hole_g3_0 :: g
gen_C:Z4_0 :: Nat → C:Z
Lemmas:
f(gen_C:Z4_0(n6_0)) → gen_C:Z4_0(n6_0), rt ∈ Ω(1 + n60)
Generator Equations:
gen_C:Z4_0(0) ⇔ Z
gen_C:Z4_0(+(x, 1)) ⇔ C(Z, gen_C:Z4_0(x))
No more defined symbols left to analyse.
(21) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n1) was proven with the following lemma:
f(gen_C:Z4_0(n6_0)) → gen_C:Z4_0(n6_0), rt ∈ Ω(1 + n60)
(22) BOUNDS(n^1, INF)